/*
 * registerFile.h
 *
 *  Created on: Jan 21, 2013
 *      Author: Travis Drake, Ian Smith
 */

#ifndef guard_registerFile
#define guard_registerFile
#include "register.h"

#define REGISTERS 16

typedef struct {
	RegisterPtr registers[REGISTERS];
} RegisterFileStr;
typedef RegisterFileStr * RegisterFilePtr;

RegisterStr RegisterFile_getRegisterWord(RegisterFilePtr this, int registerNumber);

void RegisterFile_setRegisterWord(RegisterFilePtr this, int registerNumber, unsigned short value);

Byte RegisterFile_getRegisterHOB(RegisterFilePtr this, int registerNumber);

Byte RegisterFile_getRegisterLOB(RegisterFilePtr this, int registerNumber);

void RegisterFile_setRegisterHOB(RegisterFilePtr this, int registerNumber, Byte b);

void RegisterFile_setRegisterLOB(RegisterFilePtr this, int registerNumber, Byte b);

RegisterFilePtr RegisterFile_newRegisterFile();

void RegisterFile_free(RegisterFilePtr this);

void RegisterFile_initialize(RegisterFilePtr this);

#endif /* guard_registerFile */
